#ifndef SELECTFORMATWIZARDPAGE_H
#define SELECTFORMATWIZARDPAGE_H

#include <QWizardPage>
#include <QButtonGroup>
#include <QLabel>
#include <QListWidgetItem>

namespace Ui {
    class SelectFormatWizardPage;
}

class CollectPredefinationThread;

class SelectFormatWizardPage : public QWizardPage
{
    Q_OBJECT

public:
    explicit SelectFormatWizardPage(QWidget *parent = 0);
    ~SelectFormatWizardPage();

private:
    Ui::SelectFormatWizardPage *ui;

    QButtonGroup *m_btnGroup;
    QLabel       *m_searchLabel;
    CollectPredefinationThread *m_searchThread;

protected:
    bool isComplete() const;

private slots:
    void on_factoryList_currentRowChanged(int currentRow);
    void on_deviceList_currentRowChanged(int currentRow);
    void on_factoryList_currentItemChanged(QListWidgetItem* current, QListWidgetItem* previous);
    void on_btnSelectPredefined_toggled(bool checked);

    void onCollectFinish();
    void onCollectError(int,const QString &);

private:
    void setSelectFactoryListEnable(bool);
};

#endif // SELECTFORMATWIZARDPAGE_H
